import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/attachment_bean.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/http/bean/wroks/customers_copyInfo.dart';
import 'package:app/src/http/bean/wroks/product_bean.dart';
import 'package:app/src/ui/app_ui.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';
import 'package:app/src/utils/image_path_utils.dart';

import '../../../../dialog/dailog.dart';

///产品信息
class UiProuctInfo {
  ///订单审核里的产品信息
  static Widget buildWithOrder(
      BuildContext context, Product? data, Product? oldData,
      {String? title}) {
    if (StringUtils.isEmpty(title)) {
      title = AppStrings.of(context).ProductInformation; //产品信息
    }
    List<Widget> children = [];
    children.add(UiBase.title(context, title)); //标题
    children.add(UiBase.item(context, AppStrings.of(context).ProductName,
        data?.ProductName, oldData?.ProductName)); //产品名称
    children.add(UiBase.item(
        context,
        AppStrings.of(context).ProductCustomerName,
        data?.ProductCustomerName,
        oldData?.ProductCustomerName)); //客户产品名称
    children.add(UiBase.item(context, AppStrings.of(context).ProductEnglishName,
        data?.ProductEnglishName, oldData?.ProductEnglishName)); //特殊产品名称
    children.add(UiBase.item(context, AppStrings.of(context).OrderCode,
        data?.OrderCode, oldData?.OrderCode)); //订单编号
    children.add(UiBase.item(context, AppStrings.of(context).OrderOutCode,
        data?.OrderOutCode, oldData?.OrderOutCode)); //订单外部编号
    children.add(UiBase.item(context, AppStrings.of(context).PoCode,
        data?.PoCode, oldData?.PoCode)); //批次编号
    children.add(UiBase.item(context, AppStrings.of(context).OrderProjectName,
        data?.OrderProjectName, oldData?.OrderProjectName)); //订单项目
    children.add(UiBase.item(context, AppStrings.of(context).PrintType,
        data?.PrintType, oldData?.PrintType)); //打印要求
    var pcn =
        ((data?.BigClass ?? "") + ("  ,   ") + (data?.ProductClassName ?? ""));
    children.add(UiBase.item(
        context, AppStrings.of(context).ProductClassName, pcn, null)); //产品类型
    if (StringUtils.isNotEmptyOrZero(data?.PdContractArea)) {
      children.add(UiBase.item(context, AppStrings.of(context).PdContractArea,
          data?.PdContractArea, oldData?.PdContractArea,
          unit: "m²")); //产品面积
    }
    if (StringUtils.isNotEmptyOrZero(data?.MinusArea)) {
      children.add(UiBase.item(context, AppStrings.of(context).MinusArea,
          data?.MinusArea, oldData?.MinusArea,
          unit: "m²")); //减调面积
    }
    if (StringUtils.isNotEmptyOrZero(data?.PdOrderArea)) {
      children.add(UiBase.item(context, AppStrings.of(context).PdOrderArea,
          data?.PdOrderArea, oldData?.PdOrderArea,
          unit: "m²")); //下单面积
    }
    if (StringUtils.isNotEmptyOrZero(data?.PdOdQuotient)) {
      print(
          "data?.PdOdQuotient:===========================${data?.PdOdQuotient}");
      children.add(UiBase.item(context, AppStrings.of(context).PdOdQuotient,
          data?.PdOdQuotient, oldData?.PdOdQuotient)); //下单面积占比
    }
    if (StringUtils.isNotEmptyOrZero(data?.MaxLengthC)) {
      var mc = "${data?.MinLengthC}mm-${data?.MaxLengthC}mm";
      children.add(UiBase.item(
          context, AppStrings.of(context).MaxLengthC, mc, null)); //长边限制
    }
    if (StringUtils.isNotEmptyOrZero(data?.MaxLengthD)) {
      var md = "${data?.MinLengthD}mm-${data?.MaxLengthD}mm";
      children.add(UiBase.item(
          context, AppStrings.of(context).MinLengthD, md, null)); //短边限制
    }
    children.add(UiBase.item(context, AppStrings.of(context).TaxCode,
        data?.TaxCode, oldData?.TaxCode)); //税码
    children.add(UiBase.item(context, AppStrings.of(context).TaxRate,
        data?.TaxRate, oldData?.TaxRate)); //结算税率
    children.add(UiBase.item(context, AppStrings.of(context).AccountMethods,
        data?.AccountMethods, oldData?.AccountMethods)); //结算要求
    children.add(UiBase.item(context, AppStrings.of(context).QualityType,
        data?.QualityType, oldData?.QualityType)); //质量标准
    children.add(UiBase.item(context, AppStrings.of(context).AbnormityArea,
        data?.AbnormityArea, oldData?.AbnormityArea)); //异形面积
    children.add(UiBase.item(context, AppStrings.of(context).ProductPrice,
        data?.ProductPrice, oldData?.ProductPrice)); //单价
    children.add(UiBase.item(context, AppStrings.of(context).PriceUnitName,
        data?.PriceUnitName, oldData?.PriceUnitName)); //计价单位
    children.add(UiBase.item(context, AppStrings.of(context).CurrencyType,
        data?.CurrencyType, oldData?.CurrencyType)); //货币种类
    children.add(UiBase.item(context, AppStrings.of(context).DrillHolePrice,
        data?.DrillHolePrice, oldData?.DrillHolePrice)); //打孔单价
    children.add(UiBase.item(context, AppStrings.of(context).CustomerDate,
        data?.CustomerDate, oldData?.CustomerDate)); //客户下单日期
    children.add(UiBase.item(context, AppStrings.of(context).AddDate7,
        data?.AddDate, oldData?.AddDate)); //录入日期
    children.add(UiBase.item(context, AppStrings.of(context).GlueType,
        data?.GlueType, oldData?.GlueType)); //密封胶
    children.add(UiBase.item(context, AppStrings.of(context).GlueName,
        data?.GlueName, oldData?.GlueName)); //胶水品牌
    children.add(UiBase.item(context, AppStrings.of(context).GlueBrand,
        data?.GlueBrand, oldData?.GlueBrand)); //胶水品牌
    children.add(UiBase.item(context, AppStrings.of(context).GlueDeepType,
        data?.GlueDeepType, oldData?.GlueDeepType)); //中空胶深
    children.add(UiBase.item(context, AppStrings.of(context).OtherGlueDeep,
        data?.OtherGlueDeep, oldData?.OtherGlueDeep)); //胶深数值
    children.add(UiBase.item(context, AppStrings.of(context).PackageType,
        data?.PackageType, oldData?.PackageType)); //包装要求
    children.add(UiBase.item(context, AppStrings.of(context).SalesmanName3,
        data?.SalesmanName, oldData?.SalesmanName)); //业务经理
    children.add(UiBase.item(context, AppStrings.of(context).MerchandiserName,
        data?.MerchandiserName, oldData?.MerchandiserName)); //客服经理
    children.add(UiBase.item(context, AppStrings.of(context).PriorityType,
        data?.PriorityType, oldData?.PriorityType)); //优先等级
    children.add(UiBase.item(context, AppStrings.of(context).IsYp, data?.IsYp,
        oldData?.IsYp)); //大样小样
    children.add(UiBase.item(context, AppStrings.of(context).DeliverDateDay,
        data?.DeliverDateDay, oldData?.DeliverDateDay)); //交货期限
    children.add(UiBase.item(context, AppStrings.of(context).FactoryName,
        data?.FactoryName, oldData?.FactoryName)); //生产工厂
    children.add(UiBase.item(context, AppStrings.of(context).DeliveryAddress,
        data?.DeliveryAddress, oldData?.DeliveryAddress)); //送货地址
    children.add(UiBase.item(context, AppStrings.of(context).IsSubmit,
        data?.IsSubmit, oldData?.IsSubmit)); //质检提交
    children.add(UiBase.item(context, AppStrings.of(context).FilmType,
        data?.FilmType, oldData?.FilmType)); //贴膜类型
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsForeign, data?.IsForeign)); //是否外贸
    children.add(UiBase.item(context, AppStrings.of(context).OrderClass,
        data?.OrderClass, oldData?.OrderClass)); //订单类型
    children.add(UiBase.item(context, AppStrings.of(context).ProdDeptName,
        data?.ProdDeptName, oldData?.ProdDeptName)); //生产部门
    children.add(UiBase.item(context, AppStrings.of(context).MaterialCode,
        data?.MaterialCode, oldData?.MaterialCode)); //物料编码
    children.add(UiBase.item(context, AppStrings.of(context).GasType,
        data?.GasType, oldData?.GasType)); //充气类型
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).NonProduce, data?.NonProduce)); //是否需要生产
    children.add(UiBase.itemWithYes(context,
        AppStrings.of(context).AllOutProduce, data?.AllOutProduce)); //是否全委外
    children.add(UiBase.item(context, AppStrings.of(context).BendType,
        data?.BendType, oldData?.BendType)); //铝条折弯
    children.add(UiBase.itemWithYes(
        context,
        AppStrings.of(context).DistinctSizeName,
        data?.DistinctSizeName)); //大小错片
    children.add(UiBase.itemWithYes(
        context,
        AppStrings.of(context).AdgeSeatTypeName,
        data?.AdgeSeatTypeName)); //是否打孔
    children.add(UiBase.itemWithYes(context,
        AppStrings.of(context).IsDigChipName, data?.IsDigChipName)); //是否挖缺
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsAbnormity, data?.IsAbnormity)); //是否异形
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsGrid, data?.IsGrid)); //是否格栅
    children.add(UiBase.itemWithYes(context,
        AppStrings.of(context).IsWaterTrough, data?.IsWaterTrough)); //是否卡槽
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).AllCheck, data?.AllCheck)); //是否全检
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }

  ///产品信息；这里的产品信息对应合同审核里的产品信息
  static Widget buildWithProuct(
      BuildContext context, Product? data, Product? oldData,
      {String? title}) {
    if (StringUtils.isEmpty(title)) {
      title = AppStrings.of(context).ProductInformation; //产品信息
    }
    List<Widget> children = [];
    children.add(UiBase.title(context, title)); //标题
    children.add(UiBase.item(context, AppStrings.of(context).ProductName,
        data?.ProductName, oldData?.ProductName)); //产品名称
    children.add(UiBase.item(context, AppStrings.of(context).ProductNote,
        data?.StructureContent, oldData?.StructureContent)); //产品备注
    var pcn =
        ((data?.BigClass ?? "") + ("  ,   ") + (data?.ProductClassName ?? ""));
    children.add(UiBase.item(
        context, AppStrings.of(context).ProductClassName, pcn, null)); //产品类型
    children.add(UiBase.item(context, AppStrings.of(context).ProductPrice,
        data?.ProductPrice, oldData?.ProductPrice)); //单价
    children.add(UiBase.item(context, AppStrings.of(context).PriceUnitName,
        data?.PriceUnitName, oldData?.PriceUnitName)); //计价单位
    children.add(UiBase.item(context, AppStrings.of(context).TaxCode,
        data?.TaxCode, oldData?.TaxCode)); //税码
    children.add(UiBase.item(context, AppStrings.of(context).TaxRate,
        data?.TaxRate, oldData?.TaxRate)); //结算税率
    children.add(UiBase.item(context, AppStrings.of(context).DrillHolePrice,
        data?.DrillHolePrice, oldData?.DrillHolePrice)); //打孔单价
    children.add(UiBase.item(context, AppStrings.of(context).QualityType,
        data?.QualityType, oldData?.QualityType)); //质量标准
    children.add(UiBase.item(context, AppStrings.of(context).AccountMethods,
        data?.AccountMethods, oldData?.AccountMethods)); //结算要求
    children.add(UiBase.item(context, AppStrings.of(context).GasType,
        data?.GasType, oldData?.GasType)); //充气类型
    children.add(UiBase.item(context, AppStrings.of(context).GlueType,
        data?.GlueType, oldData?.GlueType)); //密封胶
    children.add(UiBase.item(context, AppStrings.of(context).GlueName,
        data?.GlueName, oldData?.GlueName)); //胶水名称
    children.add(UiBase.item(context, AppStrings.of(context).GlueBrand,
        data?.GlueBrand, oldData?.GlueBrand)); //胶水品牌
    children.add(UiBase.item(context, AppStrings.of(context).GlueDeepType,
        data?.GlueDeepType, oldData?.GlueDeepType)); //中空胶深
    children.add(UiBase.item(context, AppStrings.of(context).OtherGlueDeep,
        data?.OtherGlueDeep, oldData?.OtherGlueDeep)); //胶深数值
    children.add(UiBase.itemWithYes(
        context,
        AppStrings.of(context).DistinctSizeName,
        data?.DistinctSizeName)); //大小错片
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsAbnormity, data?.IsAbnormity)); //是否异形
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsGrid, data?.IsGrid)); //是否格栅
    children.add(UiBase.item(context, AppStrings.of(context).FilmType,
        data?.FilmType, oldData?.FilmType)); //贴膜类型
    children.add(UiBase.item(context, AppStrings.of(context).PdContractArea,
        data?.PdContractArea, oldData?.PdContractArea,
        unit: "m²", isStart: true)); //产品面积
    children.add(UiBase.item(context, AppStrings.of(context).MinusArea,
        data?.MinusArea, oldData?.MinusArea,
        unit: "m²", isStart: true)); //减调面积
    children.add(UiBase.item(context, AppStrings.of(context).PrintType,
        data?.PrintType, oldData?.PrintType)); //打印要求
    children.add(UiBase.item(context, AppStrings.of(context).DeliveryAddress2,
        data?.DeliveryAddress, oldData?.DeliveryAddress)); //送货地点
    children.add(UiBase.item(context, AppStrings.of(context).FactoryName,
        data?.FactoryName, oldData?.FactoryName)); //生产工厂
    var mc = "${data?.MinLengthC}mm-${data?.MaxLengthC}mm";
    children.add(UiBase.item(
        context, AppStrings.of(context).MaxLengthC, mc, null)); //长边限制
    var md = "${data?.MinLengthD}mm-${data?.MaxLengthD}mm";
    children.add(UiBase.item(
        context, AppStrings.of(context).MinLengthD, md, null)); //短边限制
    children.add(UiBase.item(context, AppStrings.of(context).BendType,
        data?.BendType, oldData?.BendType)); //铝条折弯
    children.add(UiBase.item(
        context,
        AppStrings.of(context).ProductCustomerName,
        data?.ProductCustomerName,
        oldData?.ProductCustomerName,
        isStart: true)); //客户产品名称
    children.add(UiBase.item(context, AppStrings.of(context).ProductEnglishName,
        data?.ProductEnglishName, oldData?.ProductEnglishName)); //特殊产品名称

    // children.add(UiBase.item(context, AppStrings.of(context).OrderCode,
    //     data?.OrderCode, oldData?.OrderCode)); //订单编号
    // children.add(UiBase.item(context, AppStrings.of(context).OrderOutCode,
    //     data?.OrderOutCode, oldData?.OrderOutCode)); //订单外部编号
    // children.add(UiBase.item(context, AppStrings.of(context).PoCode,
    //     data?.PoCode, oldData?.PoCode)); //批次编号
    // children.add(UiBase.item(context, AppStrings.of(context).OrderProjectName,
    //     data?.OrderProjectName, oldData?.OrderProjectName)); //订单项目
    //
    // if (StringUtils.isNotEmptyOrZero(data?.PdOrderArea)) {
    //   children.add(UiBase.item(context, AppStrings.of(context).PdOrderArea,
    //       data?.PdOrderArea, oldData?.PdOrderArea,
    //       unit: "m²")); //下单面积
    // }
    // if (StringUtils.isNotEmptyOrZero(data?.PdOdQuotient)) {
    //   print(
    //       "data?.PdOdQuotient:===========================${data?.PdOdQuotient}");
    //   children.add(UiBase.item(context, AppStrings.of(context).PdOdQuotient,
    //       data?.PdOdQuotient, oldData?.PdOdQuotient)); //下单面积占比
    // }
    // children.add(UiBase.item(context, AppStrings.of(context).AbnormityArea,
    //     data?.AbnormityArea, oldData?.AbnormityArea)); //异形面积
    //
    // children.add(UiBase.item(context, AppStrings.of(context).CurrencyType,
    //     data?.CurrencyType, oldData?.CurrencyType)); //货币种类
    //
    // children.add(UiBase.item(context, AppStrings.of(context).CustomerDate,
    //     data?.CustomerDate, oldData?.CustomerDate)); //客户下单日期
    // children.add(UiBase.item(context, AppStrings.of(context).AddDate7,
    //     data?.AddDate, oldData?.AddDate)); //录入日期
    //
    // children.add(UiBase.item(context, AppStrings.of(context).PackageType,
    //     data?.PackageType, oldData?.PackageType)); //包装要求
    // children.add(UiBase.item(context, AppStrings.of(context).SalesmanName3,
    //     data?.SalesmanName, oldData?.SalesmanName)); //业务经理
    // children.add(UiBase.item(context, AppStrings.of(context).MerchandiserName,
    //     data?.MerchandiserName, oldData?.MerchandiserName)); //客服经理
    // children.add(UiBase.item(context, AppStrings.of(context).PriorityType,
    //     data?.PriorityType, oldData?.PriorityType)); //优先等级
    // children.add(UiBase.item(context, AppStrings.of(context).IsYp, data?.IsYp,
    //     oldData?.IsYp)); //大样小样
    // children.add(UiBase.item(context, AppStrings.of(context).DeliverDateDay,
    //     data?.DeliverDateDay, oldData?.DeliverDateDay)); //交货期限
    //
    //
    // children.add(UiBase.item(context, AppStrings.of(context).IsSubmit,
    //     data?.IsSubmit, oldData?.IsSubmit)); //质检提交
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).IsForeign, data?.IsForeign)); //是否外贸
    // children.add(UiBase.item(context, AppStrings.of(context).OrderClass,
    //     data?.OrderClass, oldData?.OrderClass)); //订单类型
    // children.add(UiBase.item(context, AppStrings.of(context).ProdDeptName,
    //     data?.ProdDeptName, oldData?.ProdDeptName)); //生产部门
    // children.add(UiBase.item(context, AppStrings.of(context).MaterialCode,
    //     data?.MaterialCode, oldData?.MaterialCode)); //物料编码
    //
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).NonProduce, data?.NonProduce)); //是否需要生产
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).AllOutProduce, data?.AllOutProduce)); //是否全委外
    //
    // children.add(UiBase.itemWithYes(
    //     context,
    //     AppStrings.of(context).AdgeSeatTypeName,
    //     data?.AdgeSeatTypeName)); //是否打孔
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).IsDigChipName, data?.IsDigChipName)); //是否挖缺
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).IsWaterTrough, data?.IsWaterTrough)); //是否卡槽
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).AllCheck, data?.AllCheck)); //是否全检
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }

  ///产品信息；这里的产品信息对应合同审核里的产品信息;(提成比例审核)
  static Widget buildWithTicheng(
      BuildContext context, Product? data, Product? oldData,
      {String? title}) {
    if (StringUtils.isEmpty(title)) {
      title = AppStrings.of(context).ProductInformation; //产品信息
    }
    List<Widget> children = [];
    children.add(UiBase.title(context, title)); //标题
    children.add(UiBase.item(context, AppStrings.of(context).ProductName,
        data?.ProductName, oldData?.ProductName)); //产品名称
    children.add(UiBase.item(context, AppStrings.of(context).ProductNote,
        data?.StructureContent, oldData?.StructureContent)); //产品备注
    var pcn =
        ((data?.BigClass ?? "") + ("  ,   ") + (data?.ProductClassName ?? ""));
    children.add(UiBase.item(
        context, AppStrings.of(context).ProductClassName, pcn, null)); //产品类型
    children.add(UiBase.item(context, AppStrings.of(context).ProductPrice,
        data?.ProductPrice, oldData?.ProductPrice)); //单价
    children.add(UiBase.item(context, AppStrings.of(context).PriceUnitName,
        data?.PriceUnitName, oldData?.PriceUnitName)); //计价单位
    children.add(UiBase.item(context, AppStrings.of(context).TaxCode,
        data?.TaxCode, oldData?.TaxCode)); //税码
    children.add(UiBase.item(context, AppStrings.of(context).TaxRate,
        data?.TaxRate, oldData?.TaxRate)); //结算税率
    children.add(UiBase.item(context, AppStrings.of(context).DrillHolePrice,
        data?.DrillHolePrice, oldData?.DrillHolePrice)); //打孔单价
    children.add(UiBase.item(context, AppStrings.of(context).AccountMethods,
        data?.AccountMethods, oldData?.AccountMethods)); //结算要求
    children.add(UiBase.item(context, AppStrings.of(context).GasType,
        data?.GasType, oldData?.GasType)); //充气类型
    children.add(UiBase.item(context, AppStrings.of(context).GlueType,
        data?.GlueType, oldData?.GlueType)); //密封胶
    children.add(UiBase.item(context, AppStrings.of(context).GlueName,
        data?.GlueName, oldData?.GlueName)); //胶水名称
    children.add(UiBase.item(context, AppStrings.of(context).GlueBrand,
        data?.GlueBrand, oldData?.GlueBrand)); //胶水品牌
    children.add(UiBase.item(context, AppStrings.of(context).GlueDeepType,
        data?.GlueDeepType, oldData?.GlueDeepType)); //中空胶深

    if (StringUtils.isEmpty(data?.GluDeepRule)) {
      children.add(UiBase.item(context, AppStrings.of(context).OtherGlueDeep,
          data?.OtherGlueDeep, oldData?.OtherGlueDeep)); //胶深数值
    } else {
      children.add(UiBase.item(context, AppStrings.of(context).OtherGlueDeep,
          "${data?.OtherGlueDeep}", "${oldData?.OtherGlueDeep}",
          sufix: InkWell(
            child: Text(
              "\t(${AppStrings.of(context).chakanguize})\t",
              style: TextStyle(color: Colors.blueAccent),
            ),
            onTap: () {
              //fixme 查看规则=====================================================
              String? content = data?.GluDeepRule;
              if (!StringUtils.isEmpty(content)) {
                AppDialog.showDialogWithInfo(context, content: content);
              }
            },
          )));
    }

    children.add(UiBase.itemWithYes(
        context,
        AppStrings.of(context).DistinctSizeName,
        data?.DistinctSizeName)); //大小错片
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsAbnormity, data?.IsAbnormity)); //是否异形
    children.add(UiBase.itemWithYes(
        context, AppStrings.of(context).IsGrid, data?.IsGrid)); //是否格栅
    children.add(UiBase.item(context, AppStrings.of(context).FilmType,
        data?.FilmType, oldData?.FilmType)); //贴膜类型
    children.add(UiBase.item(context, AppStrings.of(context).PdContractArea,
        data?.PdContractArea, oldData?.PdContractArea,
        unit: "m²", isStart: true)); //产品面积
    children.add(UiBase.item(context, AppStrings.of(context).QualityType,
        data?.QualityType, oldData?.QualityType)); //质量标准
    // children.add(UiBase.item(context, AppStrings.of(context).MinusArea,
    //     data?.MinusArea, oldData?.MinusArea,
    //     unit: "m²",isStart: true)); //减调面积
    children.add(UiBase.item(context, AppStrings.of(context).PrintType,
        data?.PrintType, oldData?.PrintType)); //打印要求
    children.add(UiBase.item(context, AppStrings.of(context).DeliveryAddress2,
        data?.DeliveryAddress, oldData?.DeliveryAddress)); //送货地点
    children.add(UiBase.item(context, AppStrings.of(context).FactoryName,
        data?.FactoryName, oldData?.FactoryName)); //生产工厂
    // var mc = "${data?.MinLengthC}mm-${data?.MaxLengthC}mm";
    var mc = "${data?.MinLengthC}-${data?.MaxLengthC}";
    children.add(UiBase.item(
        context, AppStrings.of(context).MaxLengthC, mc, null)); //长边限制
    // var md = "${data?.MinLengthD}mm-${data?.MaxLengthD}mm";
    var md = "${data?.MinLengthD}-${data?.MaxLengthD}";
    children.add(UiBase.item(
        context, AppStrings.of(context).MinLengthD, md, null)); //短边限制
    children.add(UiBase.item(context, AppStrings.of(context).BendType,
        data?.BendType, oldData?.BendType)); //铝条折弯
    children.add(UiBase.item(
        context,
        AppStrings.of(context).ProductCustomerName,
        data?.ProductCustomerName,
        oldData?.ProductCustomerName,
        isStart: true)); //客户产品名称
    children.add(UiBase.item(context, AppStrings.of(context).ProductEnglishName,
        data?.ProductEnglishName, oldData?.ProductEnglishName)); //特殊产品名称

    // children.add(UiBase.item(context, AppStrings.of(context).OrderCode,
    //     data?.OrderCode, oldData?.OrderCode)); //订单编号
    // children.add(UiBase.item(context, AppStrings.of(context).OrderOutCode,
    //     data?.OrderOutCode, oldData?.OrderOutCode)); //订单外部编号
    // children.add(UiBase.item(context, AppStrings.of(context).PoCode,
    //     data?.PoCode, oldData?.PoCode)); //批次编号
    // children.add(UiBase.item(context, AppStrings.of(context).OrderProjectName,
    //     data?.OrderProjectName, oldData?.OrderProjectName)); //订单项目
    //
    // if (StringUtils.isNotEmptyOrZero(data?.PdOrderArea)) {
    //   children.add(UiBase.item(context, AppStrings.of(context).PdOrderArea,
    //       data?.PdOrderArea, oldData?.PdOrderArea,
    //       unit: "m²")); //下单面积
    // }
    // if (StringUtils.isNotEmptyOrZero(data?.PdOdQuotient)) {
    //   print(
    //       "data?.PdOdQuotient:===========================${data?.PdOdQuotient}");
    //   children.add(UiBase.item(context, AppStrings.of(context).PdOdQuotient,
    //       data?.PdOdQuotient, oldData?.PdOdQuotient)); //下单面积占比
    // }
    // children.add(UiBase.item(context, AppStrings.of(context).AbnormityArea,
    //     data?.AbnormityArea, oldData?.AbnormityArea)); //异形面积
    //
    // children.add(UiBase.item(context, AppStrings.of(context).CurrencyType,
    //     data?.CurrencyType, oldData?.CurrencyType)); //货币种类
    //
    // children.add(UiBase.item(context, AppStrings.of(context).CustomerDate,
    //     data?.CustomerDate, oldData?.CustomerDate)); //客户下单日期
    // children.add(UiBase.item(context, AppStrings.of(context).AddDate7,
    //     data?.AddDate, oldData?.AddDate)); //录入日期
    //
    // children.add(UiBase.item(context, AppStrings.of(context).PackageType,
    //     data?.PackageType, oldData?.PackageType)); //包装要求
    // children.add(UiBase.item(context, AppStrings.of(context).SalesmanName3,
    //     data?.SalesmanName, oldData?.SalesmanName)); //业务经理
    // children.add(UiBase.item(context, AppStrings.of(context).MerchandiserName,
    //     data?.MerchandiserName, oldData?.MerchandiserName)); //客服经理
    // children.add(UiBase.item(context, AppStrings.of(context).PriorityType,
    //     data?.PriorityType, oldData?.PriorityType)); //优先等级
    // children.add(UiBase.item(context, AppStrings.of(context).IsYp, data?.IsYp,
    //     oldData?.IsYp)); //大样小样
    // children.add(UiBase.item(context, AppStrings.of(context).DeliverDateDay,
    //     data?.DeliverDateDay, oldData?.DeliverDateDay)); //交货期限
    //
    //
    // children.add(UiBase.item(context, AppStrings.of(context).IsSubmit,
    //     data?.IsSubmit, oldData?.IsSubmit)); //质检提交
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).IsForeign, data?.IsForeign)); //是否外贸
    // children.add(UiBase.item(context, AppStrings.of(context).OrderClass,
    //     data?.OrderClass, oldData?.OrderClass)); //订单类型
    // children.add(UiBase.item(context, AppStrings.of(context).ProdDeptName,
    //     data?.ProdDeptName, oldData?.ProdDeptName)); //生产部门
    // children.add(UiBase.item(context, AppStrings.of(context).MaterialCode,
    //     data?.MaterialCode, oldData?.MaterialCode)); //物料编码
    //
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).NonProduce, data?.NonProduce)); //是否需要生产
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).AllOutProduce, data?.AllOutProduce)); //是否全委外
    //
    // children.add(UiBase.itemWithYes(
    //     context,
    //     AppStrings.of(context).AdgeSeatTypeName,
    //     data?.AdgeSeatTypeName)); //是否打孔
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).IsDigChipName, data?.IsDigChipName)); //是否挖缺
    // children.add(UiBase.itemWithYes(context,
    //     AppStrings.of(context).IsWaterTrough, data?.IsWaterTrough)); //是否卡槽
    // children.add(UiBase.itemWithYes(
    //     context, AppStrings.of(context).AllCheck, data?.AllCheck)); //是否全检
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}
